<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全部回款</title>
    <link rel="stylesheet" href="/static/crm/lib/layui-v2.6.3/css/layui.css" media="all">
</head>

<body>
    <script src="/static/crm/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <fieldset class="table-search-fieldset">
                <legend>搜索信息</legend>
                <div style="margin: 10px 10px 10px 10px">
                    <form class="layui-form layui-form-pane" action="">
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">合同编号</label>
                                <div class="layui-input-inline">

                                    <input type="text" name="number" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">合同名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">客户名称</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">签约人</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">审批状态：</label>
                                <div class="layui-input-inline">
                                    <select id="demoReload" name="status" lay-verify="">
                                        <option value=""></option>
                                        <option value="0">待审核</option>
                                        <option value="1">审核中</option>
                                        <option value="2">审核通过</option>
                                    </select>
                                </div>
                            </div>
                            <!-- <div class="layui-inline">
                                <label class="layui-form-label">合同金额</label>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="text" name="money" placeholder="￥" autocomplete="off"
                                        class="layui-input">
                                </div>
                                <div class="layui-form-mid">-</div>
                                <div class="layui-input-inline" style="width: 100px;">
                                    <input type="text" name="money" placeholder="￥" autocomplete="off"
                                        class="layui-input">
                                </div> -->
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn layui-btn-primary" lay-submit lay-filter="data-search-btn"><i
                                    class="layui-icon"></i> 搜 索</button>
                        </div>
                </div>
                </form>
        </div>
        </fieldset>
        <script type="text/html" id="toolbarDemo">

                <div class="layui-btn-container">
                    <button class="layui-btn layui-btn-danger layui-btn-sm " lay-event="but"><i class="layui-icon layui-anim layui-icon-refresh-3" data-anim="layui-anim-rotate"></i></button>
                    <button class="layui-btn layui-btn-normal layui-btn-sm layui-btn-disabled " id="stamp"> <i class="layui-icon  layui-icon-print"></i>  打印 </button>
                    <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add"><i class="layui-icon  layui-icon-edit layui-icon-addition"></i> 添加 </button>
                    <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="recycle">回收站 </button>

                </div>
            </script>

        <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>

        <script type="text/html" id="currentTableBar">
                <a class="layui-btn layui-btn-sm layui-btn-xs " lay-event="proceeds">收款</a>
                <a class="layui-btn layui-btn-sm layui-btn-xs " lay-event="audit">日志</a>
                <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit" ><i class="layui-icon  layui-icon-edit"></i></a>
                <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="delete" ><i class="layui-icon layui-icon-delete"></i>删除</a>

               
            </script>

    </div>
    </div>
    <script>
        layui.use(['form', 'table'], function () {
            var $ = layui.jquery,
                form = layui.form,
                table = layui.table;

            let userTable = table.render({
                elem: '#currentTableId',
                url: 'index',
                toolbar: '#toolbarDemo',
                defaultToolbar: ['filter', 'exports', 'print', {
                    title: '提示',
                    layEvent: 'LAYTABLE_TIPS',
                    icon: 'layui-icon-tips'
                }],
                cols: [[
                    { type: "checkbox", width: 50, fixed: 'left' },
                    { field: 'id', title: 'ID', sort: true, fixed: 'left' },
                    { field: 'number', minWidth: '190', title: '合同编号' },
                    { field: 'name', minWidth: '110', title: '合同名称' },
                    { field: '', while: '80', title: '客户' },
                    { field: 'money', minWidth: '110', title: '合同金额', sort: true },
                    { field: 'deposit', minWidth: '110', title: '回款金额', sort: true },
                    { field: 'remark', while: '80', title: '备注', },
                    { field: 'order_time', minWidth: '110', title: '下单时间', sort: true },
                    { field: 'start_time', minWidth: '110', title: '开始时间', sort: true },
                    { field: 'end_time', minWidth: '110', title: '过期时间', sort: true },
                    { field: '', Width: '80', title: '审批人', },
                    { field: '', Width: '80', title: '签约人' },
                    { field: 'status', Width: '80', title: '状态', sort: true },
                    { title: '操作', minWidth: 260, toolbar: '#currentTableBar', align: "center", fixed: 'right' }
                ]],
                limits: [5, 10, 20, 25, 50, 100],
                limit: 5,
                page: true,
                skin: 'line',
                parseData: function (res) {
                    var result;
                    if (this.page.curr) {
                        result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
                    } else {
                        result = res.data.slice(0, this.limit);
                    }
                    return { 'code': res.code, 'msg': res.msg, 'count': res.total, 'data': result };
                }
            });
        });